package com.git.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.git.dao.StudentDao;
import com.git.domain.StudentEntity;
import com.git.service.DemoService;

@Service
@Transactional
public class DemoServiceImpl implements DemoService{
	@Autowired
	private StudentDao studentDao;
	@Override
	public List<StudentEntity> getAll() {
		return this.studentDao.findAll();
	}

	@Override
	public void add(StudentEntity studentEntity) {
		this.studentDao.save(studentEntity);
	}

	@Override
	public void deleteStudent(Integer id) {
		this.studentDao.delete(id);
	}

}
